package com.zhijiaoyun.controller.api.mobile;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhijiaoyun.controller.base.BaseController;

/**
 * @author shisfish
 * @date 2017/12/20
 */
@Controller
@RequestMapping(value = "/api/mobile/category")
public class CategoryMobileApi extends BaseController {

    @ResponseBody
    @RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET)
    public Map<String, Object> getCategory(@PathVariable("parentId") long parentId) {
        return courseCategoryService.listByParentId(parentId);
    }

}
